<template>
  <el-date-picker
    :value="value"
    @input="update"
    clearable
    :placeholder="placeholder"
    :start-placeholder="multLang('title_ak_h')"
    :end-placeholder="multLang('title_al_k')"
    type="daterange"
    range-separator="-"
    value-format="yyyy-MM-dd"
  >
  </el-date-picker>
</template>
<script>
export default {
  name: 'CDateRange',
  components: {},
  props: {
    value: {
      type: Array,
      default() {
        return []
      }
    },
    placeholder: { type: String, default: '' },
    start: { type: String, default: '' },
    end: { type: String, default: '' }
  },
  data() {
    return {}
  },
  computed: {},
  watch: {},
  beforeCreate() {},
  created() {},
  beforeMount() {},
  mounted() {},
  beforeUpdate() {},
  updated() {},
  activated() {},
  deactivated() {},
  beforeDestroy() {},
  destroyed() {},
  methods: {
    update(val) {
      this.$emit('input', val)
      this.$emit('update:start', val[0] || '')
      this.$emit('update:end', val[1] || '')
    }
  }
}
</script>
<style lang="scss"></style>
